<extend name="Public/base" />

<block name="body">
	<!-- 标题栏 -->
	<div class="main-title">
		<h2>读书系列列表</h2>
	</div>
	<div class="cf">
		<div class="fl">
            <a class="btn" href="{:U('add')}">新 增</a>
        </div>

		<!-- 高级搜索 -->
        <form action="{:U('index')}" method="post" class="form-horizontal">
		<div class="search-form fr cf">
		 <label style="margin:5px">系列类型:</label>
		<select class="form-control" id="Select" name="bookType" style="display: inline-block;">
			<volist name="bookType" id="vo" key="k" >
			<option value = {$k} <if condition="I('bookType')==$k">selected<else/></if>>{$vo}</option>
			</volist>
		</select>
			<!--<div class="sleft">
				<!-- <input type="text" name="bookname" class="search-input" value="{:I('bookname')}" placeholder="请输入图书名称"> 
				<!-- <a class="sch-btn" href="javascript:;" id="search" url="{:U('index')}"><i class="btn-search"></i></a> 
				<button class="sch-btn" id="submit" type="submit" target-form="{:U('index')}" style="border:0;background:#fff;"><i class="btn-search"></i></button>
			</div>-->
		</div>
		</form>
    </div>
    <!-- 数据列表 -->
    <div class="data-table table-striped">
	<table class="">
    <thead>
        <tr>
		<th class="">序号</th>
		<th class="">系列名称</th>
		<th class="">系列类型</th>
		<th class="">操作</th>
		</tr>
    </thead>
    <tbody>
		<notempty name="_list">
		<volist name="_list" id="vo">
		<tr>
			<td>{$key+1} </td>
			<td>{$vo.series}</td>
			<td><volist name="bookType" id="vos" key="k" >
					<if condition="$vo['type']==$k">{$vos}<else/></if>
					</volist>
			<td><a href="{:U('ReadSeries/editSeries?id='.$vo['id'])}" class="authorize">编辑</a>
				<a href="{:U('ReadSeries/seriesDetail?seriesid='.$vo['id'])}" class="authorize">查看详细</a>
                <a href="{:U('ReadSeries/deleteSeries?id='.$vo['id'])}" class="confirm ajax-get">删除</a>
                </td>
		</tr>
		</volist>
		<else/>
		<td colspan="4" class="text-center"> aOh! 暂时还没有内容! </td>
		</notempty>
	</tbody>
    </table>
	</div>
    <div class="page">
        {$_page}
    </div>
</block>

<block name="script">
	<script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>

	<script type="text/javascript">
	
	$('#Select').change(function(){
		//alert($(this).children('option:selected').val());
		var p1=$(this).children('option:selected').val();//这就是selected的值
		var p2=$('#id-input').val();//获取本页面其他标签的值
		window.location.href="index.php?s=/Admin/ReadSeries/index/bookType/"+p1;//页面跳转并传参
	})
    //导航高亮
    highlight_subnav('{:U('ReadSeries/index')}');
	</script>
</block>
